{temp('admin/head')}
<link rel="stylesheet" href="{$adstyle}/js/datatables/dataTables.bootstrap.css">
	
</head>
<body class="page-body">
		
		{temp('admin/left')}
			
			{temp('admin/top')}
			
			<!-- Basic Setup -->
			<div class="panel panel-default">
				<div class="panel-heading">
					<h3 class="panel-title">{$tit}</h3>
					<div class="panel-options">
						<a href="#" style="color:red;">
							<i class="fa fa-yelp"></i>
							冻结为禁止用户登录，
							解冻为恢复用户登录权限，
							重置为将用户密码重置为“123456”。
						</a>

						<a href="{$_url}/admin/?act=recruit&met=zjiagl{$gnpd}">
							<i class="fa-rotate-right"></i>
							刷新
						</a>
						
					</div>
				</div>
				<div class="panel-body">
					
					<script type="text/javascript">
					jQuery(document).ready(function($)
					{
						$("#example").dataTable({
							"oLanguage": {
								"sUrl":"{$adstyle}/js/datatables/js/zn.txt"
							},
							aLengthMenu: [
								[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]
							]
						});
					});
					</script>
					
					<div data-pattern="priority-columns" data-add-display-all-btn="false" data-add-focus-btn="false">
					
					<table id="example" class="table table-striped table-bordered" cellspacing="0" width="100%">
						<thead>
							<tr>
								<th>专家ID</th>
								<th>专家号</th>
								<th>关联企业ID</th>
								<th>注册时间</th>
								<th>上次登陆时间</th>
								<th>操作</th>
							</tr>
						</thead>
					
						<tbody class="middle-align">
							{if(@$rs)}
							{foreach($rs as $k=>$v)}
							<tr>
								<td>{$v['id']}</td>
								<td style="width:20%">{if($v['type'] == 1)} {$v['phone']} {elseif($v['type'] ==2)} {$v['email']} {else}{/if}</td>
								<td>{$v['qyid']}</td>
								<td>{code(echo date('Y-m-d H:i',$v['time']))}</td>
								<td>{code(echo date('Y-m-d H:i',$v['dltime']))}</td>
								<td>
									<a href="{$_url}/admin/?act=recruit&met=zjiagl_xx&id={$v['id']}{$gnpd}" class="btn btn-secondary btn-sm btn-icon icon-left">
										查看
									</a>	
									<a href="{$_url}/admin/?act=recruit&met=zjiagl_bianjiym&id={$v['id']}{$gnpd}" class="btn btn-info btn-sm btn-icon icon-left">
										编辑
									</a>
									<button onclick="dong({$v['id']},1)" class="btn btn-pink btn-sm btn-icon icon-left">
										{if($v['dongjie'] == 1)}解冻{else}冻结{/if}
									</button>
									<button onclick="dong({$v['id']},2)" class="btn btn-orange btn-sm btn-icon icon-left">
										重置
									</button>							
								</td>
							</tr>
							{/foreach}
							{/if}
						</tbody>
					</table>	
					</div>					
				</div>
			</div>
			
	<script type="text/javascript">		
	function dong(id,type){  //冻结
		$.post('{$_url}/admin/?act=recruit&met=zjia_bianji{$gnpd}',{id:id,type:type},function(data){
			if(data == 'cg'){
				if(type==2){
					alert('重置成功');	
				}
				location.href='{$_url}/admin/?act=recruit&met=zjiagl{$gnpd}';
			}else{
				alert(data);
			}
		});			
	}
	</script>		
	{temp('admin/foot')}
	
	<!-- Bottom Scripts -->
	<script src="{$adstyle}/js/bootstrap.min.js"></script>
	<script src="{$adstyle}/js/TweenMax.min.js"></script>
	<script src="{$adstyle}/js/resizeable.js"></script>
	<script src="{$adstyle}/js/joinable.js"></script>
	<script src="{$adstyle}/js/xenon-api.js"></script>
	<script src="{$adstyle}/js/xenon-toggles.js"></script>
	<script src="{$adstyle}/js/datatables/js/jquery.dataTables.min.js"></script>

	<!-- Imported scripts on this page -->
	<script src="{$adstyle}/js/datatables/dataTables.bootstrap.js"></script>
	<script src="{$adstyle}/js/rwd-table/js/rwd-table.min.js"></script>

	<!-- JavaScripts initializations and stuff -->
	<script src="{$adstyle}/js/xenon-custom.js"></script>
</body>
</html>